package com.aliyun.iot.demo.iothub;

public class Utility {

	//byte数组转换short数组
	public static short[] toShortArray(byte[] src) {

		int count = src.length >> 1;
		short[] dest = new short[count];
		for (int i = 0; i < count; i++) {
			dest[i] = (short) (src[i * 2 + 1] << 8 | src[2 * i] & 0xff);
		}
		return dest;
	}
}
